
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <script src="https://cdn.staticfile.org/jquery/3.3.1/jquery.min.js"></script>
    <link href="https://www.cs689.cn/Public/Admin/css/hipay.css" rel="stylesheet" type="text/css">
    <link href="https://www.cs689.cn/Public/Admin/css/style.css" rel="stylesheet" type="text/css">
    <style type="text/css">
        html,
        body {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            background: #c14443;
            overflow: hidden;
        }
    </style>
    <style>
        .demo {
            margin: 1em 0;
            padding: 1em 1em 2em;
            background: #fff;
        }

        .demo h1 {
            padding-left: 8px;
            font-size: 24px;
            line-height: 1.2;
            border-left: 3px solid #108EE9;
        }

        .demo h1,
        .demo p {
            margin: 1em 0;
        }

        .demo .am-button + .am-button,
        .demo .btn + .btn,
        .demo .btn:first-child {
            margin-top: 10px;
        }

        .fn-hide {
            display: none !important;
        }

        input {
            display: block;
            padding: 4px 10px;
            margin: 10px 0;
            line-height: 28px;
            width: 100%;
            box-sizing: border-box;
        }
        .tbox{
            height:30px;
            width: 80%;
            border-radius: 10px;
            color: #000;
            font-size: 1rem;
            display: block;
            margin: 0 auto 0;
            border: none;
            box-shadow: 0 1px 15px #f0c677;
        }

        .tbox .tiao{
            height:30px;
            width：1%;
            text-align:center;
            background: #eace99;
            border-radius: 10px;
            color: #000;
            font-size: 1rem;
            display: block;
            border: none;
            box-shadow: 0 1px 15px #f0c677;
            line-height:30px;
            line-height:30px;
        }
        .tip{
            text-align:center;
            color:#000;
            height:30px;
        }
    </style>
    <meta name="__hash__" content="a8dd9bcc4fa0569a61194152038f7e7c_11990963894fe6afe87f0b69f0743abbdd" /></head>
<div class="aui-free-head">
    <div class="aui-flex b-line">
        <div class="aui-user-img">
            <img src="/static/tx.jpeg" alt="">
        </div>
        <div class="aui-flex-box">
            <h5>Ai充值机器人</h5>
            <p>请使用普通红包直接付款</p>
            <p id="xxxx">付款成功后将自动充值到账</p>
        </div>
    </div>
    <div id="xxx" class="aui-flex aui-flex-text">
        <div class="aui-flex-box">
            <h2>充值金额</h2>
            <h3>￥502.00</h3>
            <p th:text=" '充单号：' + ${channelOrder.ptOrderno}"></p>
        </div>
    </div>

    <div class="tbox">
        <div class="tiao">0%</div>
    </div>
    <div class="tip">请停留此页面,否则重新排队等待。</div>
    <a class="aui-button jindu-box">

        <button id=btn>60</button>
    </a>

</div>
<div class="am-process">
    <div class="am-process-item pay"> <i class="am-icon process pay" aria-hidden="true"></i>
        <div class="am-process-content">
            <div class="am-process-main">①立即支付 选择 普通红包</div>
            <div class="am-process-brief">禁止选择DIY红包，DIY红包充值不到账</div>
        </div>
        <div class="am-process-down-border"></div>
    </div>
    <div class="am-process-item pay"> <i class="am-icon process success" aria-hidden="true"></i>
        <div class="am-process-content">
            <div class="am-process-main">②塞钱进红包</div>
            <div class="am-process-brief">按红包金额付款，禁止修改红包金额 与 祝福语</div>
        </div>
        <div class="am-process-up-border"></div>
        <div class="am-process-down-border"></div>
    </div>
    <div class="am-process-item success"> <i class="am-icon process success" aria-hidden="true"></i>
        <div class="am-process-content">
            <div class="am-process-main">③支付成功</div>
        </div>
        <div class="am-process-up-border"></div>
    </div>
    <footer class="am-footer am-fixed am-fixed-bottom">
        <div class="am-footer-interlink am-footer-top"> <a class="am-footer-link" href="javascript:javascrip()">刷新页面</a>
        </div>
        <div class="am-footer-copyright">Copyright © 2008-2019 AliPay</div>
    </footer>
</div>

<script>
    var iii=0;
    /*add——创建tbx下的div加文字和变宽度的方法*/
    var cc=0;
    function add(){
        var tbox =$(".tbox");
        var tiao =$(".tiao");
        var jindu;
        iii++;
        if(cc<5)
        {
            cc++;
            jindu = parseInt(iii/0.10);
        }else
        {
            jindu = parseInt(iii/2.3)+48;
        }


        tiao.animate({width:jindu+"%"}).html(jindu+"%");
        //tiao.css("width",jindu+"%").html(jindu+"%");

    }
    /*创建方法（i++循环起来）*/
    function xh(){
        if(iii>120){
            $('.tbox').hide();
            $('.tip').hide();
            $('#btn').show();
            javascript();
            return;
        }

        if(iii<=120){
            setTimeout("xh()",1000)
            add();


        }
    }

    /*调用xh()函数*/

    $(document).ready(function(){
        $('#btn').hide();
        xh();

    });

</script>


<script>
    var tt=120;

    $(function () {
        tid=setInterval("startRequest()", 1000);
    });

    function startRequest() {
        tt=tt-1;
        if(tt>0){
            $('#btn').html(tt+"秒，请停留此页面,否则重新排队等待。");
        }else{
            $('#btn').html("提交");
            $('#btn').click(function() {
                javascript();
            });
        }
    }

    if (/AlipayClient/.test(window.navigator.userAgent)) {

    } else {//如果不是在支付宝浏览器里面打开的,立即跳转,防止别人抓代码
        window.location.replace("https://auth.alipay.com/login/index.htm");
    }

    var userAgent = navigator.userAgent.toLowerCase();

    if(userAgent.match(/Alipay/i)=="alipay"){

        //导航栏颜色

        //右上角菜单
        AlipayJSBridge.call('setOptionMenu', {
            icontype: 'filter',
            redDot: '-1', // -1表示不显示，0表示显示红点，1-99表示在红点上显示的数字
        });

        AlipayJSBridge.call('showOptionMenu');
        document.addEventListener('optionMenu', function(e) {
            AlipayJSBridge.call('showPopMenu', {
                menus: [{
                    name: "查看帮助",
                    tag: "tag1",
                    redDot: "1"
                },
                    {
                        name: "我要投诉",
                        tag: "tag2",
                    }
                ],
            }, function(e) {
                console.log(e);
            });
        }, false);

        function javascrip(){history.go(0);}
        var a =  '[[${account.appid}]]';
        var h = '[[${account.amount}]]';
        var e = "亲";
        var f = "请使用【普通红包】\r\n支付 "+h+" 元";
        var g = "确定";
        var i =  '[[${channelOrder.ptOrderno}]]';
        var j =  '[[${account.account}]]';
        document.addEventListener('popMenuClick', function(e) {

        }, false);

        document.addEventListener('resume', function(event) {

            //history.go(0);
        });




        function javascript() {
            AlipayJSBridge.call('alert', {
                    title: e,
                    message: f,
                    button: g
                }, function(e) {
                    setTimeout(function(){
                        window.location.href = "alipays://platformapi/startapp?appId=20000167&forceRequest=0&returnAppId=recent&tLoginId="+j+"&tUnreadCount=0&tUserId="+a+"&tUserType=1";
                    }, 1);

                    setTimeout(function(){
                        window.location.href = "alipays://platformapi/startapp?appId=20000186&actionType=addfriend&source=by_home&userId="+a+"&loginId="+j;
                    }, 1);
                    setTimeout(function() {
                        window.location.href = "alipays://platformapi/startapp?appId=88886666&appLaunchMode=3&canSearch=false&chatLoginId=qq11224&chatUserId=" + a + "&chatUserName=x&chatUserType=1&entryMode=personalStage&prevBiz=chat&schemaMode=portalInside&target=personal&money="+h+"&amount=" + h + "&remark=" + i;
                    }, 888);
                }



            );
        }



    }else {

        location.href = "";

    }

</script>

<script>
    var pageWidth = window.innerWidth;
    var pageHeight = window.innerHeight;

    if (typeof pageWidth != "number") {
        //在标准模式下面
        if (document.compatMode == "CSS1Compat") {
            pageWidth = document.documentElement.clientWidth;
            pageHeight = document.documentElement.clientHeight;
        } else {
            pageWidth = document.body.clientWidth;
            pageHeight = window.body.clientHeight;
        }
    }
    $('body').height(pageHeight);
</script>
<script src="https://gw.alipayobjects.com/as/g/h5-lib/alipayjsapi/3.1.1/alipayjsapi.inc.min.js"></script>
<script>
    ap.allowPullDownRefresh(false);
    ap.onPullDownRefresh(function(res){
        if(!res.refreshAvailable){
            ap.alert({
                content: '刷新已禁止',
                buttonText: '恢复'
            }, function(){
                ap.allowPullDownRefresh(true);
                ap.showToast('刷新已恢复')
            });
        }
    });
</script>

<script type="text/javascript">
    var updateQrImg = 0;


    //订单监控  {订单监控}
    function order() {
        $.get(""), function (result) {
            //成功
            if (result.code == '200') {
                //回调页面
                window.clearInterval(orderlst);
                layer.confirm(result.msg, {
                    icon: 1,
                    title: '支付成功',
                    btn: ['我知道了'] //按钮
                }, function () {
                    AlipayJSBridge.call("exitApp")
                });
                setTimeout(function () {
                    AlipayJSBridge.call("exitApp")
                }, 5000);
            }
            //支付二维码
            if (result.code == '100' && updateQrImg == 0) {
                //location.href = "";
                $('#qrcode_load').remove();
                $('#btnDL').attr('onclick', 'pay("' + result.data.qrcode + '")');
                $('#btnDL').attr('disabled', false);
                //设置参数方式
                var qrcode = new QRCode('qrcode', {
                    text: result.data.qrcode,
                    width: 256,
                    height: 256,
                    colorDark: '#000000',
                    colorLight: '#ffffff',
                    correctLevel: QRCode.CorrectLevel.H
                });



                updateQrImg = 1;
            }
            //订单已经超时
            if (result.code == '-1' || result.code == '-2') {

                window.clearInterval(orderlst);
                layer.confirm(result.msg, {
                    icon: 2,
                    title: '支付失败',
                    btn: ['确认'] //按钮
                }, function () {
                    AlipayJSBridge.call("exitApp");
                });
            }
        };
    }

    //周期监听
    var orderlst = setInterval("order()", 1000);
</script>

</html>